package com.wws.family.db.dao

import androidx.room.Dao
import androidx.room.Delete
import androidx.room.Insert
import androidx.room.OnConflictStrategy
import androidx.room.Update
import androidx.room.Upsert

/**
 *@Description: 基础Dao
 *@Date: 2024/8/21 14:03
 *@Author: WangWeiShuo
 */
@Dao
interface BaseDao<T> {
    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insert(bean: T)

    @Insert(onConflict = OnConflictStrategy.REPLACE)
    fun insertAll(bean: T)

    @Update
    fun update(bean: T)

    @Delete
    fun detele(bean: T)

    @Upsert
    fun upsert(bean: T)
}